package me.goldze.mvvmhabit.utils;

public class NullUtils {
    public static <T> NullTransform isNullAble(T t) {
        return (runnable, runnable2) -> {
            if (t != null)
                runnable.run();
            else
                runnable2.run();
        };
    }

    @FunctionalInterface
    public interface NullTransform {
        void isNull(Runnable runnable, Runnable runnable2);
    }

}
